package test.task.fun.serialize;

import java.util.List;

import org.codehaus.jackson.type.TypeReference;

import test.task.fun.model.GoodsPosition;

public class SerializerImpl implements Serializer {

	private final JackSonSerializer jackSonSerializer = new JackSonSerializer();

	@Override
	public String servialize(List<GoodsPosition> positions) {
		return jackSonSerializer.serialize(positions);
	}

	@Override
	public List<GoodsPosition> deSerialize(String goodsPositions) {
		return jackSonSerializer.deSerialize(goodsPositions, new TypeReference<List<GoodsPosition>>() {
		});

	}

}
